Repository navigation
Prepare Hydrogen commands for typed JSON output - #4095
Conversation
f6fd624 to
e0da655
Compare
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
60a805a to
806fac6
Compare
fredericoo
left a comment
There was a problem hiding this comment.
nice groundwork for the stack - the init hook tests covering --, --path=, help/schema and the env flag are really thorough, and good to see the task adapter gone now the nightly has cli#8672. One small comment on how alerts get flattened in JSON mode, nothing blocking.
fredericoo
left a comment
There was a problem hiding this comment.
a couple of follow-up questions I forgot to include earlier, neither blocking the approval
806fac6 to
ee17b8b
Compare
6c889de to
abd25ea
Compare
6084f4e to
7eebc52
Compare
bccc3e7 to
29a0fc8
Compare
kdaviduik
left a comment
There was a problem hiding this comment.
Hydrogen 2 is now on the 2026-04 branch, please change the base branch for this stack to merge into 2026-04 instead :)
29a0fc8 to
302fffd
Compare
302fffd to
409d7cf
Compare
Blocking comment already fixed
WHY are these changes introduced?
Finite Hydrogen commands need shared schema and error support before exposing reliable JSON results.
WHAT is this pull request doing?
Pin Shopify CLI and CLI Kit to the matching stable release (
4.9.0), add shared contracts and real-stream capture, and validate project and disabled-command rules in the command lifecycle so CLI Kit emits standard fatal errors. Expose--no-inputthrough shared flags so prompt and browser-authentication policy remains independent from--json. Use CLI Kit UI helpers directly, keep VM startup in the init hook, and keep JSON diagnostics on stderr.HOW to test your changes?
pnpm --filter @shopify/cli-hydrogen build pnpm --filter @shopify/cli-hydrogen typecheck pnpm --filter @shopify/cli-hydrogen testVerified CLI 4.9.0 loads the Cloudflare
tunnel_providerandtunnel_starthooks from its root plugin. Hydrogen must not register the separate plugin again, which would duplicate tunnels. CPU startup profiling was checked against a built storefront and repeated runs with isolated globals. Built-in imports are restricted to an explicit allowlist without filesystem, network or process access. Like the Vite build that precedes it, this Node profiler runs trusted project code; its fresh VM context is not a security sandbox.Verified timer behavior with MiniOxygen's actual workerd runtime and Oxygen compatibility date
2025-04-01: bothsetTimeoutandsetIntervalat module scope fail with "Disallowed operation called within global scope". The profiler intentionally preserves that startup restriction; timers remain valid inside request handlers. Regression tests cover this and denied static/dynamic imports of host I/O built-ins.Checklist